﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using QLNS_Public;

namespace QLNS_Data
{
   public class DangNhap_Data
    {
       KetNoiCSDL_Data kn = new KetNoiCSDL_Data();

       public DataTable DangNhap_GiamDoc(NhanVien_Public tenDangNhap, NhanVien_Public matKhau)
       {
           int n = 2;
           string[] name = new string[n];
           object[] value = new object[n];
           name[0] = "@TenDangNhap";
           value[0] = tenDangNhap.TenDangNhap;
           name[1] = "@MatKhau";
           value[1] = matKhau.MatKhau;
           return kn.LayDuLieu("DangNhap_GiamDoc",name,value,n);
       }
       public DataTable DangNhap_QuanLy(NhanVien_Public tenDangNhap, NhanVien_Public matKhau)
       {
           int n = 2;
           string[] name = new string[n];
           object[] value = new object[n];
           name[0] = "@TenDangNhap";
           value[0] = tenDangNhap.TenDangNhap;
           name[1] = "@MatKhau";
           value[1] = matKhau.MatKhau;
           return kn.LayDuLieu("DangNhap_QuanLy", name, value, n);
       }
       public DataTable DangNhap_NhanVien(NhanVien_Public tenDangNhap, NhanVien_Public matKhau)
       {
           int n = 2;
           string[] name = new string[n];
           object[] value = new object[n];
           name[0] = "@TenDangNhap";
           value[0] = tenDangNhap.TenDangNhap;
           name[1] = "@MatKhau";
           value[1] = matKhau.MatKhau;
           return kn.LayDuLieu("DangNhap_NhanVien", name, value, n);
       }
    }
}
